home *** CD-ROM | disk | FTP | other *** search
/ Aminet 44 / Aminet 44 (2001)(GTI - Schatztruhe)[!][Aug 2001].iso / Aminet / comm / misc / Spitfire2.lha / Spitfireイ Install / developer / spitfireAPI.doc < prev    next >
Text File  |  2000-03-27  |  14KB  |  757 lines

  1. TABLE OF CONTENTS
  2.  
  3. spitfireAPI.library/---overview---
  4. spitfireAPI.library/Spit_AddUser
  5. spitfireAPI.library/Spit_CloseUsersFile
  6. spitfireAPI.library/Spit_FirstUser
  7. spitfireAPI.library/Spit_GetActiveUser
  8. spitfireAPI.library/Spit_GetClientSig
  9. spitfireAPI.library/Spit_GetEnvPath
  10. spitfireAPI.library/Spit_GetNotifyEvent
  11. spitfireAPI.library/Spit_GetNotifySig
  12. spitfireAPI.library/Spit_GetSystemID
  13. spitfireAPI.library/Spit_GetUserID
  14. spitfireAPI.library/Spit_GetUserName
  15. spitfireAPI.library/Spit_GetUserPassword
  16. spitfireAPI.library/Spit_GetUserPath
  17. spitfireAPI.library/Spit_GetUserPos
  18. spitfireAPI.library/Spit_GotoUser
  19. spitfireAPI.library/Spit_LastUser
  20. spitfireAPI.library/Spit_NextUser
  21. spitfireAPI.library/Spit_NotifyClients
  22. spitfireAPI.library/Spit_NotifyServer
  23. spitfireAPI.library/Spit_NumberUsers
  24. spitfireAPI.library/Spit_OpenUsersFile
  25. spitfireAPI.library/Spit_PrevUser
  26. spitfireAPI.library/Spit_ReadEvent
  27. spitfireAPI.library/Spit_RegisterClient
  28. spitfireAPI.library/Spit_RegisterServer
  29. spitfireAPI.library/Spit_RemoveClient
  30. spitfireAPI.library/Spit_RemoveServer
  31. spitfireAPI.library/Spit_SaveUsersFile
  32. spitfireAPI.library/Spit_SetActiveUser
  33. spitfireAPI.library/Spit_SetEnvPath
  34. spitfireAPI.library/Spit_SetSystemID
  35. spitfireAPI.library/Spit_SetUserID
  36. spitfireAPI.library/Spit_SetUserName
  37. spitfireAPI.library/Spit_SetUserPassword
  38. spitfireAPI.library/Spit_SetUserPath
  39. spitfireAPI.library/Spit_Wait4Event
  40.  
  41.  
  42.  spitfireAPI.library/---overview---             spitfireAPI.library/---overview---
  43.  
  44.    SPITFIRE² DESKTOP CLIENTS
  45.  
  46.         Spitfire² clients need to communicate with the HSM program. This is
  47.         done through the spitfireAPI.library. The client needs to call
  48.         Spit_RegisterClient() in order to receive messages from HSM.  When
  49.         existing, the client needs to remove itself with a call to
  50.         Spit_RemoveClient().
  51.  
  52.         A client may look like this:
  53.  
  54.             client = Spit_RegisterClient();
  55.                 ...
  56.                 Spit_WaitForEvent(client);
  57.                 Spit_ReadEvent(client,&event,&data);
  58.                 ...
  59.             Spit_RemoveClient(client);
  60.  
  61.         More often though, you will want to listen to other ports as well,
  62.         for instance that of a window:
  63.  
  64.             client = Spit_RegisterClient();
  65.                 ...
  66.                 mask = (1<<Spit_GetClientSig(client))|(1<<windowsigbit);
  67.                 Wait(mask);
  68.                 Spit_ReadEvent(client,&event,&data);
  69.                 ...
  70.             Spit_RemoveClient(client);
  71.  
  72.  
  73.  
  74.    EVENT CODES
  75.  
  76.         HSM broadcasts the following event codes:
  77.  
  78.            SPIT_QUIT
  79.  
  80.                 If your client receives SPIT_QUIT, remove it as soon as
  81.                 possible.
  82.  
  83.            SPIT_SHOWINTERFACE
  84.  
  85.                 When this message is broadcast, the client should open its
  86.                 window.
  87.  
  88.            SPIT_HIDEINTERFACE
  89.  
  90.                 When this message is broadcast, the client should close
  91.                 its window and anything similar.
  92.  
  93.            SPIT_SAVEDB
  94.  
  95.                 A broadcase of this message means that HSM is in HotSync
  96.                 mode, and your application should save all data in order
  97.                 for the conduit to synchronize the data.
  98.  
  99.            SPIT_LOADDB
  100.  
  101.                 This event is usually broadcast once HotSyncing is done,
  102.                 thus your application should reload and update its data.
  103.  
  104.            SPIT_NEWUSERS
  105.  
  106.                 This event indicates a new user has been added to the user
  107.                 list.  You should update your applications user list as
  108.                 soon as possible.
  109.  
  110.  
  111.  spitfireAPI.library/Spit_AddUser                spitfireAPI.library/Spit_AddUser
  112.  
  113.    NAME
  114.         Spit_AddUser --
  115.  
  116.    SYNOPSIS
  117.  
  118.    FUNCTION
  119.  
  120.    INPUTS
  121.  
  122.    RESULT
  123.  
  124.    SEE ALSO
  125.  
  126.  
  127.  spitfireAPI.library/Spit_CloseUsersFile         spitfireAPI.library/Spit_CloseUsersFile
  128.  
  129.    NAME
  130.         Spit_CloseUsersFile -- ends access to an opened users.dat file
  131.  
  132.    SYNOPSIS
  133.         success = Spit_CloseUserFile(userlist)
  134.         D0                           D0
  135.  
  136.         LONG Spit_CloseUser(APTR);
  137.  
  138.    FUNCTION
  139.  
  140.    INPUTS
  141.  
  142.    RESULT
  143.  
  144.    SEE ALSO
  145.  
  146.  
  147.  spitfireAPI.library/Spit_FirstUser              spitfireAPI.library/Spit_FirstUser
  148.  
  149.    NAME
  150.         Spit_FirstUser --
  151.  
  152.    SYNOPSIS
  153.         = Spit_FirstUser(userlist)
  154.  
  155.    FUNCTION
  156.  
  157.    INPUTS
  158.  
  159.    RESULT
  160.  
  161.    SEE ALSO
  162.  
  163.  
  164.  spitfireAPI.library/Spit_GetActiveUser          spitfireAPI.library/Spit_GetActiveUser
  165.  
  166.    NAME
  167.         Spit_GetActiveUser --
  168.  
  169.    SYNOPSIS
  170.         = Spit_GetActiveUser(userlist)
  171.  
  172.    FUNCTION
  173.  
  174.    INPUTS
  175.  
  176.    RESULT
  177.  
  178.    SEE ALSO
  179.  
  180.  
  181.  spitfireAPI.library/Spit_GetClientSig           spitfireAPI.library/Spit_GetClientSig
  182.  
  183.    NAME
  184.         Spit_GetClientSig -- get the signal of a client port
  185.  
  186.    SYNOPSIS
  187.         signal = Spit_GetClientSig(client)
  188.         D0                      D0
  189.  
  190.         UBYTE Spit_GetClientSig(APTR);
  191.  
  192.    FUNCTION
  193.         This function returns the signal that will be set when a message
  194.         arrives at the given client's message port. Using a Wait() for
  195.         this signal is somewhat more useful than using Spit_WaitForEvent(),
  196.         as this will let you listen to other signals as well.
  197.  
  198.    INPUTS
  199.         client - a pointer to the client whose signal you wish to obtain.
  200.  
  201.    RESULT
  202.         signal - the number of the signal associated with the given
  203.                  client's port.
  204.  
  205.    SEE ALSO
  206.         Spit_ReadEvent(), Spit_WaitForEvent()
  207.  
  208.  spitfireAPI.library/Spit_GetEnvPath             spitfireAPI.library/Spit_GetEnvPath
  209.  
  210.    NAME
  211.         Spit_GetEnvPath --
  212.  
  213.    SYNOPSIS
  214.  
  215.    FUNCTION
  216.  
  217.    INPUTS
  218.  
  219.    RESULT
  220.  
  221.    SEE ALSO
  222.  
  223.  
  224.  spitfireAPI.library/Spit_GetNotifyEvent         spitfireAPI.library/Spit_GetNotifyEvent
  225.  
  226.    NAME
  227.         Spit_GetNotifyEvent --
  228.  
  229.    SYNOPSIS
  230.  
  231.    FUNCTION
  232.  
  233.    INPUTS
  234.  
  235.    RESULT
  236.  
  237.    SEE ALSO
  238.  
  239.  
  240.  spitfireAPI.library/Spit_GetNotifySig           spitfireAPI.library/Spit_GetNotifySig
  241.  
  242.    NAME
  243.         Spit_GetNotifySig --
  244.  
  245.    SYNOPSIS
  246.  
  247.    FUNCTION
  248.  
  249.    INPUTS
  250.  
  251.    RESULT
  252.  
  253.    SEE ALSO
  254.  
  255.  
  256.  spitfireAPI.library/Spit_GetSystemID            spitfireAPI.library/Spit_GetSystemID
  257.  
  258.    NAME
  259.         Spit_GetSystemID --
  260.  
  261.    SYNOPSIS
  262.  
  263.    FUNCTION
  264.  
  265.    INPUTS
  266.  
  267.    RESULT
  268.  
  269.    SEE ALSO
  270.  
  271.  
  272.  spitfireAPI.library/Spit_GetUserID              spitfireAPI.library/Spit_GetUserID
  273.  
  274.    NAME
  275.         Spit_GetUserID --
  276.  
  277.    SYNOPSIS
  278.  
  279.    FUNCTION
  280.  
  281.    INPUTS
  282.  
  283.    RESULT
  284.  
  285.    SEE ALSO
  286.  
  287.  
  288.  spitfireAPI.library/Spit_GetUserName            spitfireAPI.library/Spit_GetUserName
  289.  
  290.    NAME
  291.         Spit_GetUserName --
  292.  
  293.    SYNOPSIS
  294.  
  295.    FUNCTION
  296.  
  297.    INPUTS
  298.  
  299.    RESULT
  300.  
  301.    SEE ALSO
  302.  
  303.  
  304.  spitfireAPI.library/Spit_GetUserPassword        spitfireAPI.library/Spit_GetUserPassword
  305.  
  306.    NAME
  307.         Spit_GetUserPassword --
  308.  
  309.    SYNOPSIS
  310.  
  311.    FUNCTION
  312.  
  313.    INPUTS
  314.  
  315.    RESULT
  316.  
  317.    SEE ALSO
  318.  
  319.  
  320.  spitfireAPI.library/Spit_GetUserPath            spitfireAPI.library/Spit_GetUserPath
  321.  
  322.    NAME
  323.         Spit_GetUserPath --
  324.  
  325.    SYNOPSIS
  326.  
  327.    FUNCTION
  328.  
  329.    INPUTS
  330.  
  331.    RESULT
  332.  
  333.    SEE ALSO
  334.  
  335.  
  336.  spitfireAPI.library/Spit_GetUserPos             spitfireAPI.library/Spit_GetUserPos
  337.  
  338.    NAME
  339.         Spit_GetUserPos --
  340.  
  341.    SYNOPSIS
  342.  
  343.    FUNCTION
  344.  
  345.    INPUTS
  346.  
  347.    RESULT
  348.  
  349.    SEE ALSO
  350.  
  351.  
  352.  spitfireAPI.library/Spit_GotoUser               spitfireAPI.library/Spit_GotoUser
  353.  
  354.    NAME
  355.         Spit_GotoUser --
  356.  
  357.    SYNOPSIS
  358.  
  359.    FUNCTION
  360.  
  361.    INPUTS
  362.  
  363.    RESULT
  364.  
  365.    SEE ALSO
  366.  
  367.  
  368.  spitfireAPI.library/Spit_LastUser               spitfireAPI.library/Spit_LastUser
  369.  
  370.    NAME
  371.         Spit_LastUser --
  372.  
  373.    SYNOPSIS
  374.  
  375.    FUNCTION
  376.  
  377.    INPUTS
  378.  
  379.    RESULT
  380.  
  381.    SEE ALSO
  382.  
  383.  
  384.  spitfireAPI.library/Spit_NextUser               spitfireAPI.library/Spit_NextUser
  385.  
  386.    NAME
  387.         Spit_NextUser --
  388.  
  389.    SYNOPSIS
  390.  
  391.    FUNCTION
  392.  
  393.    INPUTS
  394.  
  395.    RESULT
  396.  
  397.    SEE ALSO
  398.  
  399.  
  400.  spitfireAPI.library/Spit_NotifyClients          spitfireAPI.library/Spit_NotifyClients
  401.  
  402.    NAME
  403.         Spit_NotifyClients --
  404.  
  405.    SYNOPSIS
  406.  
  407.    FUNCTION
  408.  
  409.    INPUTS
  410.  
  411.    RESULT
  412.  
  413.    SEE ALSO
  414.  
  415.  
  416.  spitfireAPI.library/Spit_NotifyServer           spitfireAPI.library/Spit_NotifyServer
  417.  
  418.    NAME
  419.         Spit_NotifyServer -- notify the HSM server of an event
  420.  
  421.    SYNOPSIS
  422.  
  423.    FUNCTION
  424.  
  425.    INPUTS
  426.  
  427.    RESULT
  428.  
  429.    SEE ALSO
  430.  
  431.  
  432.  spitfireAPI.library/Spit_NumberUsers            spitfireAPI.library/Spit_NumberUsers
  433.  
  434.    NAME
  435.         Spit_NumberUsers --
  436.  
  437.    SYNOPSIS
  438.  
  439.    FUNCTION
  440.  
  441.    INPUTS
  442.  
  443.    RESULT
  444.  
  445.    SEE ALSO
  446.  
  447.  
  448.  spitfireAPI.library/Spit_OpenUsersFile          spitfireAPI.library/Spit_OpenUsersFile
  449.  
  450.    NAME
  451.         Spit_OpenUsersFile --
  452.  
  453.    SYNOPSIS
  454.  
  455.    FUNCTION
  456.  
  457.    INPUTS
  458.  
  459.    RESULT
  460.  
  461.    SEE ALSO
  462.  
  463.  
  464.  spitfireAPI.library/Spit_PrevUser               spitfireAPI.library/Spit_PrevUser
  465.  
  466.    NAME
  467.         Spit_PrevUser --
  468.  
  469.    SYNOPSIS
  470.  
  471.    FUNCTION
  472.  
  473.    INPUTS
  474.  
  475.    RESULT
  476.  
  477.    SEE ALSO
  478.  
  479.  
  480.  spitfireAPI.library/Spit_ReadEvent              spitfireAPI.library/Spit_ReadEvent
  481.  
  482.    NAME
  483.         Spit_ReadEvent -- receive a message from the server
  484.  
  485.    SYNOPSIS
  486.         success = Spit_ReadEvent(client,event,data)
  487.         D0                    A0     D1    D0
  488.  
  489.         ULONG Spit_ReadEvent(APTR,ULONG *,ULONG *);
  490.  
  491.    FUNCTION
  492.         This function reads a message from the client's message port. If a
  493.         message exists, it will copy the event and data codes into the
  494.         addresses provided by the caller, and dispose of the message.
  495.  
  496.         You should keep calling this function until it returns FALSE, as
  497.         several messages might arrive at the port simultaneously.
  498.  
  499.    INPUTS
  500.         client - the client whose port to check.
  501.         event - pointer to a longword in which to store the event code of
  502.                 the message, if there is one.
  503.         data - ditto for the data code.
  504.  
  505.    RESULT
  506.         success - TRUE if there was a message, in which case the longwords
  507.                   pointed to by the event and data fields will contain the
  508.                   info broadcast by the message, FALSE if there was no
  509.                   message.
  510.  
  511.    SEE ALSO
  512.  
  513.  
  514.  spitfireAPI.library/Spit_RegisterClient         spitfireAPI.library/Spit_RegisterClient
  515.  
  516.   NAME
  517.         Spit_RegisterClient -- create a Spitfire² message client
  518.  
  519.    SYNOPSIS
  520.         client = Spit_RegisterClient()
  521.         D0
  522.  
  523.         APTR Spit_RegisterClient(void);
  524.  
  525.    FUNCTION
  526.         This function creates a client of with the HSM message server. A
  527.         Spitfire² client should call this in order to receive messages from
  528.         the HSM through the Spit_ReadEvent() call.
  529.  
  530.         The message server must be active before any clients can be
  531.         created. If it is not, this function will fail. Normally, clients
  532.         will be launched by the DAM after the HSM server has been created, so
  533.         this should not be a problem.
  534.  
  535.    RESULT
  536.         client - a pointer to a Spitfire² message client structure, or FALSE
  537.                  if the client could not be created.
  538.  
  539.    SEE ALSO
  540.         Spit_RemoveClient(), Spit_ReadEvent()
  541.  
  542.  
  543.  spitfireAPI.library/Spit_RegisterServer         spitfireAPI.library/Spit_RegisterServer
  544.  
  545.    NAME
  546.         Spit_RegisterServer --
  547.  
  548.    SYNOPSIS
  549.  
  550.    FUNCTION
  551.  
  552.    INPUTS
  553.  
  554.    RESULT
  555.  
  556.    SEE ALSO
  557.  
  558.  
  559.  spitfireAPI.library/Spit_RemoveClient           spitfireAPI.library/Spit_RemoveClient
  560.  
  561.    NAME
  562.         Spit_RemoveClient -- destroy a KRSNAke message client
  563.  
  564.    SYNOPSIS
  565.         success = Spit_RemoveClient(client)
  566.         D0                       D0
  567.  
  568.         ULONG Spit_RemoveClient(APTR);
  569.  
  570.    FUNCTION
  571.         This function detaches a client from the server and destroys it.
  572.         All clients created by the Spit_RegisterClient() function must be
  573.         disposed of with this function.
  574.  
  575.    INPUTS
  576.         client - a pointer to a client returned from the
  577.                  Spit_RegisterClient() function.
  578.  
  579.    RESULT
  580.         success - TRUE if the client was removed, FALSE otherwise.
  581.  
  582.    SEE ALSO
  583.         Spit_RegisterClient()
  584.  
  585.  
  586.  spitfireAPI.library/Spit_RemoveServer           spitfireAPI.library/Spit_RemoveServer
  587.  
  588.    NAME
  589.         Spit_RemoveServer --
  590.  
  591.    SYNOPSIS
  592.  
  593.    FUNCTION
  594.  
  595.    INPUTS
  596.  
  597.    RESULT
  598.  
  599.    SEE ALSO
  600.  
  601.  
  602.  spitfireAPI.library/Spit_SaveUsersFile          spitfireAPI.library/Spit_SaveUsersFile
  603.  
  604.    NAME
  605.         Spit_SaveUsersFile --
  606.  
  607.    SYNOPSIS
  608.  
  609.    FUNCTION
  610.  
  611.    INPUTS
  612.  
  613.    RESULT
  614.  
  615.    SEE ALSO
  616.  
  617.  
  618.  spitfireAPI.library/Spit_SetActiveUser          spitfireAPI.library/Spit_SetActiveUser
  619.  
  620.    NAME
  621.         Spit_SetActiveUser --
  622.  
  623.    SYNOPSIS
  624.  
  625.    FUNCTION
  626.  
  627.    INPUTS
  628.  
  629.    RESULT
  630.  
  631.    SEE ALSO
  632.  
  633.  
  634.  spitfireAPI.library/Spit_SetEnvPath             spitfireAPI.library/Spit_SetEnvPath
  635.  
  636.    NAME
  637.         Spit_SetEnvPath --
  638.  
  639.    SYNOPSIS
  640.  
  641.    FUNCTION
  642.  
  643.    INPUTS
  644.  
  645.    RESULT
  646.  
  647.    SEE ALSO
  648.  
  649.  
  650.  spitfireAPI.library/Spit_SetSystemID            spitfireAPI.library/Spit_SetSystemID
  651.  
  652.    NAME
  653.         Spit_SetSystemID --
  654.  
  655.    SYNOPSIS
  656.  
  657.    FUNCTION
  658.  
  659.    INPUTS
  660.  
  661.    RESULT
  662.  
  663.    SEE ALSO
  664.  
  665.  
  666.  spitfireAPI.library/Spit_SetUserID              spitfireAPI.library/Spit_SetUserID
  667.  
  668.    NAME
  669.         Spit_SetUserID --
  670.  
  671.    SYNOPSIS
  672.  
  673.    FUNCTION
  674.  
  675.    INPUTS
  676.  
  677.    RESULT
  678.  
  679.    SEE ALSO
  680.  
  681.  
  682.  spitfireAPI.library/Spit_SetUserName            spitfireAPI.library/Spit_SetUserName
  683.  
  684.    NAME
  685.         Spit_SetUserName --
  686.  
  687.    SYNOPSIS
  688.  
  689.    FUNCTION
  690.  
  691.    INPUTS
  692.  
  693.    RESULT
  694.  
  695.    SEE ALSO
  696.  
  697.  
  698.  spitfireAPI.library/Spit_SetUserPassword        spitfireAPI.library/Spit_SetUserPassword
  699.  
  700.    NAME
  701.         Spit_SetUserPassword --
  702.  
  703.    SYNOPSIS
  704.  
  705.    FUNCTION
  706.  
  707.    INPUTS
  708.  
  709.    RESULT
  710.  
  711.    SEE ALSO
  712.  
  713.  
  714.  spitfireAPI.library/Spit_SetUserPath            spitfireAPI.library/Spit_SetUserPath
  715.  
  716.    NAME
  717.         Spit_SetUserPath --
  718.  
  719.    SYNOPSIS
  720.  
  721.    FUNCTION
  722.  
  723.    INPUTS
  724.  
  725.    RESULT
  726.  
  727.    SEE ALSO
  728.  
  729.  
  730.  spitfireAPI.library/Spit_Wait4Event             spitfireAPI.library/Spit_Wait4Event
  731.  
  732.    NAME
  733.         Spit_WaitForEvent -- wait for a message to arrive at a client's port
  734.  
  735.    SYNOPSIS
  736.         success = Spit_WaitForEvent(client)
  737.         D0                       D0
  738.  
  739.         ULONG Spit_WaitForEvent(APTR);
  740.  
  741.    FUNCTION
  742.         This function calls WaitPort() for the given client's port, which
  743.         causes the calling task to wait until the client receives a
  744.         message from the server.
  745.  
  746.    INPUTS
  747.         client - the client whose port to wait on.
  748.  
  749.    RESULT
  750.         success - TRUE if the wait succeeded, FALSE otherwise. At present,
  751.                   the FALSE return value only happens if you pass a NULL
  752.                   client pointer.
  753.  
  754.    SEE ALSO
  755.         Spit_GetClientSig(), Spit_ReadEvent()
  756.  
  757.